{% extends 'cms/cms_base.html' %}

{% block pagetitle %}
个人信息
{% endblock %}

{% block content %}
{% set user=g.user %}
<table class="table table-bordered">
    <tbody>
    <tr>
        <td>用户名</td>
        <td>{{user.username}}</td>
    </tr>
    <tr>
        <td>邮箱</td>
        <td>{{user.email}}</td>
    </tr>
    <tr>
        <td>角色</td>
        <td>
            {% for i in g.user.roles %}
            {{i.name}}
            {% if not loop.last %}
            ,
            {%endif%}
            {%endfor%}
        </td>
    </tr>
    <tr>
        <td>权限</td>
        <td>
            {% for i in g.user.roles %}
            {{i.desc}}
            {% if not loop.last %}
            ,
            {%endif%}
            {%endfor%}
        </td>
    </tr>
    <tr>
        <td>注册时间</td>
        <td>{{user.join_time}}</td>
    </tr>
    </tbody>
</table>
{% endblock %}